/* eslint-disable indent */
import request from '../utils/request';
import { stringify } from 'qs';

export async function queryPage(params) {
    return request(`/${classObjectName}/page?${r'${stringify(params)}'}`);
}

export async function queryDetail(params) {
    return request(`/${classObjectName}/detail?${r'${stringify(params)}'}`);
}

export async function add(params) {
    return request('/${classObjectName}/add', {
        method: 'POST',
        body: JSON.stringify(params),
        headers: { 'Content-Type': 'application/json' },
    });
}

export async function edit(params) {
    return request('/${classObjectName}/edit', {
        method: 'POST',
        body: JSON.stringify(params),
        headers: { 'Content-Type': 'application/json' },
    });
}

export async function bathDelete(params) {
    return request('/${classObjectName}/delete', {
        method: 'POST',
        body: JSON.stringify(params),
        headers: { 'Content-Type': 'application/json' },
    });
}